package com.jhgsys.internal.dict.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.wuwenze.poi.annotation.ExcelField;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;

/**
 * 业务字典项 Entity
 *
 * @author chenweihua
 * @date 2020-05-22 15:28:32
 */
@Data
@TableName("basic_dict_item")
public class DictItem implements Serializable {

    /**
     * 编号
     */
    @TableId(value = "item_id", type = IdType.ASSIGN_UUID)
    private String itemId;

    /**
     * 字典id
     */
    @TableField("dict_code")
    @NotBlank(message = "{required}")
    @Size(max = 20, message = "{noMoreThan}")
    private String dictCode;

    /**
     * 项目编码
     */
    @TableField("item_code")
    @NotBlank(message = "{required}")
    @Size(max = 20, message = "{noMoreThan}")
    private String itemCode;

    /**
     * 项目名称
     */
    @TableField("item_name")
    @NotBlank(message = "{required}")
    @Size(max = 200, message = "{noMoreThan}")
    private String itemName;

    /**
     * 项目名称
     */
    @TableField("alias_name")
    private String aliasName;

    /**
     * 排序号
     */
    @TableField("sort_num")
    private Integer sortNum;

    /**
     * 父编码
     */
    @TableField("parent_code")
    @Size(max = 20, message = "{noMoreThan}")
    private String parentCode;

    /**
     * 新增人
     */
    @TableField("created_by")
    @Size(max = 32, message = "{noMoreThan}")
    private String createdBy;

    /**
     * 新增时间
     */
    @TableField("created_time")
    @JsonFormat(pattern = "yyyy年MM月dd日 HH时mm分ss秒", timezone = "GMT+8")
    private Date createdTime;

    /**
     * 修改人
     */
    @TableField("updated_by")
    @Size(max = 32, message = "{noMoreThan}")
    private String updatedBy;

    /**
     * 修改时间
     */
    @TableField("updated_time")
    @JsonFormat(pattern = "yyyy年MM月dd日 HH时mm分ss秒", timezone = "GMT+8")
    private Date updatedTime;

    /**
     * 删除人
     */
    @TableField("deleted_by")
    @Size(max = 32, message = "{noMoreThan}")
    private String deletedBy;

    /**
     * 删除时间
     */
    @TableField("deleted_time")
    @JsonFormat(pattern = "yyyy年MM月dd日 HH时mm分ss秒", timezone = "GMT+8")
    private Date deletedTime;

    /**
     * 删除标记
     */
    @TableField("deleted_flg")
    private Byte deletedFlg;

    /**
     * 状态 0：禁用 1：启用
     */
    @TableField("item_status")
    @NotBlank(message = "{required}")
    @Size(max = 2, message = "{noMoreThan}")
    private String itemStatus;

}